package com.hh.customerservice.controller;

import com.hh.customerservice.feign.CustomerRentFeign;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class CustomerController {
    /**
     * 在容器有两个bean
     */
    @Resource
    private CustomerRentFeign customerRentFeign;

    @GetMapping("/customerRent")
    public String customerRent() {
        System.out.println("客户来租车了");
        return customerRentFeign.rent();
    }
}
